<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h2>Spring Boot多文件上传示例(使用AJAX)</h2>

<form method="POST" enctype="multipart/form-data" id="fileUploadForm">
    <input type="text" name="extraField"/><br/><br/>
    <input type="file" name="files"/><br/><br/>
    <input type="file" name="files"/><br/><br/>
    <input type="submit" value="上传" id="btnSubmit"/>
</form>
<h1>Ajax提交结果：</h1>
<pre>
    <span id="result"></span>
</pre>

<h2>文件分片上传</h2>
<form method="POST" action="/uploadChunk" enctype="multipart/form-data">
    <input type="file" name="file" />
    <input type="submit" value="分片上传" />
</form>




<h2>文件下载示例</h2>
<hr/>
<a href="/download/我的世界.gif">下载</a>
<p/>
<a href="/rangeDownload/我的世界.gif">断点下载</a>
<p/>
<form method="POST" action="/download">
    <input type="text" name="fileName" value="我的世界.gif"/>
    <input type="submit" value="下载"/>
</form>

<p/>
<form method="POST" action="/rangeDownload">
    <input type="text" name="fileName" value="我的世界.gif"/>
    <input type="submit" value="断点下载"/>
</form>


<script type="text/javascript" src="js/jquery-2.0.2.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>

</body>
</html>